﻿#region using
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
#endregion

namespace XmlGenSharp.Logic.Main
{
  public class AdvancedEnumAnalyzer
  {
    // Constructors

    #region AdvancedEnumAnalyzer(BindingAnalyzer bindingAnalyzer, EnumerationInfo enumerationInfo)
    public AdvancedEnumAnalyzer(BindingAnalyzer bindingAnalyzer, EnumerationInfo enumerationInfo)
    {
      BindingAnalyzer = bindingAnalyzer;
      EnumerationInfo = enumerationInfo;
    }
    #endregion

    // Public Properties

    #region BindingAnalyzer
    public BindingAnalyzer BindingAnalyzer
    {
      get;
      protected set;
    }
    #endregion

    #region EnumerationInfo
    public EnumerationInfo EnumerationInfo
    {
      get;
      protected set;
    }
    #endregion

    // Public Methods

    #region Analyze(IAnalyzerContext cx)
    public void Analyze(IAnalyzerContext cx)
    {
      cx.FoundEnumeration(EnumerationInfo);

      foreach (Element element in EnumerationInfo.Elements)
        cx.FoundEnumerationElement(EnumerationInfo, element);
    }
    #endregion
  }
}
